


Fight the Nightmares

by Athems



Category: Phineas and Ferb
Genre: Emotional Hurt/Comfort, Happy Ending, Human Perry the Platypus (Phineas and Ferb), M/M, Mentions of other characters - Freeform, Nightmares
Language: English
Status: Completed
Published: 2020-08-23
Updated: 2020-08-23
Packaged: 2021-03-06 20:20:54
Rating: General Audiences
Warnings: No Archive Warnings Apply
Chapters: 1
Words: 3,817
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/26054845
Author URL: https://archiveofourown.org/users/Athems/pseuds/Athems
Summary: When Dr. Doofenshmirtz new machine accidentally leaves him facing terrible nightmares Perry isn't sure what to do. Good thing Agent P is still willing to do anything he can to help his dear friend.
Relationships: Heinz Doofenshmirtz/Perry the Platypus
Comments: 15
Kudos: 145





	Fight the Nightmares

**Author's Note:**

> Wanted to try writing a Perryshmirtz story, since I like the dynamic of the couple, and I've been reading some fanfics about them.  
> Enjoy.

Dr. Heinz Doofenshmirtz woke up with a strangled scream. Gasping for air he sat up in bed and looked around him to remember where he was and what had happened.

"Just a nightmare..." he mumbled to himself after regaining some calm. _Or a memory..._ he thought with a shiver.

He vaguely remembered what this night's terror was about but preferred to not dwell on it anymore. It was always better to not think about any nightmare he had lest he wished to end up with an anxiety or panic attack.

A yawn escaped him making him turn to look at the clock. "3:35 a.m..." he said with a weary sigh. "Might as well start the day." With another sigh, more of resignation than tiredness, Doofenshmirtz got up from bed and made his way to the kitchen to prepare some coffee to help him keep him awake while he worked on his new -inator.

At least the nightmare has given him a good enough idea for his invention.

* * *

Perry Fletcher was sitting under the shade of the tree on the back garden watching Phineas and Ferb discuss their new project (well, more like Phineas was doing all the talking while Ferb gave short answers in return). They were thinking of making a pool with artificial waves for a surfing competition, a great idea for a warm day of summer, even if Candance kept telling them she was going to bust them.

Suddenly his watch beeped, making him jump from his position and quickly go behind the tree to enter his base.

The moment he was sitting Mayor Monogram greeted him. "Hello Agent P. It appears there has been some activity in Doofenshmirtz's lab since early morning. We still don't know what he's planning but we're sure it isn’t good. Go thwart his plans before anything happens!"

Perry gave a salute before going towards the exit. He sent a quick text to Candance to tell her he had work to do and she was in charge (he could even hear her gloat about it to her brothers) before strapping the jet pack and starting the trip to the DEI.

He entered through a window and left the jet pack on the floor.

The spy immediately saw the doctor working on a big machine, completely oblivious to his arrival. He was mumbling to himself and kept shivering a little from time to time as if he were cold.

Perry stood there, waiting to see if the man would acknowledge him, but it seemed he was too engrossed in his work for it. _That can't be good,_ the agent thought with some trepidation.

He gave a cough to catch the other's attention, resulting in Doofenshmirtz jumping in surprise at the sudden noise in the quiet of his lab.

"What?!" Heinz whirled to look at the agent, who was trying to contain a smirk at the reaction of the other. "Perry the platypus!? What are you doing here!?" His voice was louder than usual thanks to his still frayed nerves.

Perry gave him a confused look before pointing at his watch. He then signed to the doctor " _Work_."

Heinz turned to look at the clock near the console of his lab to check the time. "What? It's so late already?" Seems the construction of the machine kept him quite busy. "Well, no matter." The doctor turned to look at his opponent, "Good thing I had a trap ready for you," he said before pushing a button from the main console, making a small cage fall from the ceiling and trapping the spy inside.

Perry stood inside simply watching Doofenshmirtz. Something was amiss with his nemesis, so he decided to just wait and hear what he had planned for the day and what had trigger it.

"Usually I'll would monologue to you about the reason behind my latest invention, but I'm sure you don't want to hear it and I certainly don't want to think about it," Heinz said with a weary voice while rubbing his eyes to stop the mild headache he was feeling.

Agent P just stared at him in confusion and a little bit of worry. It wasn't like the doctor to say such a thing, and now that he noticed he could see some dark bags under the other's eyes. _Lack of sleep..._ he thought while remembering Monogram's debriefing.

Before he could think more on his enemy's state, the doctor continued.

"Anyways, this is the nightmare-inator," he explained tiredly. "I'm sure you can imagine what it does without me telling you, so I'll just activate it."

He turned the machine towards the outside of the building to hit any pedestrian that may get in the way of the beam. Before he could turn it on, Perry managed to escape the cage with one of his gadgets and was racing towards the doctor.

Doofenshmirtz gave a yelp of surprise before getting tackled by the other and knocking the machine's aim away from the window. He tried to fight back but knew he was too tired by the lack of sleep to do much, so in desperation pressed the button to activate the -inator.

The beam ricocheted around the walls of the lab making Perry stop fighting to dodge it as it passed him by. The doctor, on the other hand, was still disoriented by the fight that he didn't realize the beam coming his way before he felt a painful sensation on his chest, leaving him on the floor gasping for air as his consciousness started to fade.

Perry stood there waiting to see if Doofenshmirtz would get up, but when he realized it wasn't happening, he hurried over to see if the doctor was okay.

Heinz appeared to be asleep and a quick check on his pulse revealed that he was still alive, so the spy decided to wake him up by shaking him a little. When that didn't seem to be working, he started to shake him a little harsher, but still no reaction from the man.

Why won't he wake up? Perry wouldn't admit it out loud, but he was starting to worry. He turned his eyes towards the machine, remembering what its name was: Nightmare-inator. He was about to get up and check the invention when suddenly Doofenshmirtz started to scream.

The agent gave a start before almost getting hit by the doctor's arm, since he was trashing around with his eyes screwed shut and a grimace on his face.

The episode lasted a minute before Heinz stopped and his arms fell as if invisible strings were cut, leaving the man panting a little but still unconscious.

Perry just stared in mild fear waiting to see if it would happen again, but when no change occurred, he got closer to the doctor again.

There was a sheen of sweat on his brow, his face was still set in a grimace and he seemed to be shivering a little.

He finally understood what the -inator did to Doofenshmirtz. _A nightmare inducing machine..._ he thought with a frown. He needed to think of a way to help the doctor, if that first scream was any indication, things were going to get worst as time went on and the other kept under the influence of the beam.

Perry got up to check the machine, but Heinz appeared to have forgotten a reverse function, so that option was out of the question. He then tried to shake awake the man again, but still no success.

 _I could call for backup, but I doubt anyone in the agency can find a solution fast enough,_ he mused. Heinz might have been a weird and unlucky man, but he was a genius at inventing, so it would be hard to find someone capable of creating a counter to the -inator. And even if his nephews could create such things, he didn't want to involve them in this (he didn't wish to make them see the evil that people could do with technology).

Just as he was debating what to do next, another scream broke out, making him back away to evade the arms that were trying to fight whatever dream the other was having.

After a bit longer than the first time the screaming stopped alongside the arms, leaving the doctor pale and clammy.

 _I guess our only option is to wait for the effect to pass,_ Perry decided. He picked up the other's body in his arms so he could carry him to his bedroom. _I can't get you out of that hellish nightmare, but at least I can get you comfortable while we wait for it to end,_ he thought while giving another frown at the small shivers going around the doctor's body.

* * *

Three hours. It had already been three hours since the incident and still no change. The screams have only gotten longer and more anguish-sounding as time went on; Heinz complexion has gotten paler and paler with each episode and his body kept on shivering from what Perry finally realized was fear and not cold.

He could only look on while Doofenshmirtz suffered, not having been able to wake him at all and starting to feel desperate.

How many of those nightmares were just bad memories? Things that he hadn't even told Perry for fear of remembering. Or how many were only small bad memories affected by the -inator?

How much longer did the doctor had to suffer? Hadn't he been through enough already? Even Perry couldn't fandom someone going through all Doofenshmirtz had and still bounce back and keep on living. The guy really was stronger than anyone gave him credit.

Another scream sounded, Heinz writhing in what appeared to be pain, his arms trying to scratch at their own flesh, leaving red marks along them.

Perry went to hold unto them to stop him from hurting himself anymore. This reaction was different from the others, it was getting worst. He had to get on top of the doctor to keep a better grip on his arms until the episode ended.

Perry kept his hold on the other's arms for a little longer, thinking about what had happened. The episodes were starting to take a toll on him, and he wasn't even the victim of the machine; he couldn't even imagine how Doofenshmirtz was feeling trapped in nightmare after nightmare.

Perry was about to let go of the arms and go back to his chair on the side of the bed when he heard Heinz mumble something.

He had to get closer to try and hear what was being said, and only managed to understand some words since it was mostly German.

Then Doofenshmirtz started to move again, but this time as if trying to escape from something or someone.

"N-no, please!" the doctor said in a frightened voice. "Please, don't h-hurt me!" He was starting to shout, probably scared because his arms were being held down.

The agent was about to let him go when he heard the next sentence.

"Please, Perry!"

The man in question froze, not knowing whether the nightmare was about him or if the other was calling out to him for help. Whatever the case he couldn't keep seeing his friend like that, it was too much, too painful. So, he decided to call out to him, even if he knew his throat will hurt like hell, he had to do it.

"Heinz!" He could start to feel his throat complain about the use he was giving it. "Heinz, wake up! It's just a nightmare!"

That seemed to do the trick making the doctor wake up with a gasp, frightened eyes staring right onto Perry's as the agent was still on top of the man.

"Pe-perry?" Doofenshmirtz mumbled with confusion, before the other suddenly gathered him in his arms and held unto him for dear life.

With a clouded and confused mind from the constant nightmares, Heinz put his arms around the other and tried to comfort him with some words. "It's okay, Perry the platypus. Everything's fine."

Apparently, that was the wrong thing to say since it made the agent stiff before pulling away with an incredulous look on his face.

"Fine?!" Perry shouted before holding his throat in pain. He then started to sign in an angry manner, " _You were trapped in endless nightmares for_ -" -he turned to look at the clock- " _4 hours! How is that fine_?!"

"What?" Doofenshmirtz was still trying to make sense of what was happening. He could only remember bits but wasn't sure if they were real or not. "What happened? And why are we in my bedroom?"

Perry gave a sigh before finally getting off the other and returning to his seat. He made sure Heinz was looking at him before explaining what had happened. " _Your invention, the nightmare-inator (lame name by the way). Its beam hit you while we were fighting, rendering you unconscious for a while. I carried you here_."

The doctor gave a pensive sound while remembering the incident. He remembered the pain in his chest and then his mind fading, only to then start feeling scared. Right, the nightmares... he thought with a frown. It was bad memories turned worst, good memories turned to horrible things, and constant sensations of hopelessness and fear. His new machine worked a little too well for comfort.

Before he could dwell more on all the things he dreamt about, he felt a hand on his arm.

He turned to look at Perry, seeing worry in his eyes before he started signing, " _Are you okay_?"

"Y-yeah. Just a little shaken up by the whole thing, but I guess it'll be fine." Doofenshmirtz answered with a weary voice.

Perry didn't seem convinced but decided not to push the subject, maybe the other just needed a good night's sleep to feel better.

He then checked his phone, seeing that it was getting late and his family would be expecting him for dinner. The spy didn't wish to leave the other alone, but when Heinz saw his conflict, he decided to reassure him.

"It's okay, you can leave now Perry the platypus. It's getting late and I'm sure you have other places to be." Doofenshmirtz gave him a smile to better help convince him. "I'll guess I'll see you in a few days. You don't mind if I take some time off after all this, do you?"

The other gave a smile and a nod before instructing the doctor to get some good rest and sleep well. With that done, he took his leave, sending a quick text to Linda to let her know he would be home for dinner.

Heinz just watched him go with a sad look wishing he could have been honest about the fear he was still feeling and the probability of him not having good dreams anytime soon. But if there was one thing he learned long ago; it was that he needed to take care of his problems by himself.

Giving a sigh of resignation he got up to change his cloths. He might as well try and see if could finally sleep, even if it were for half an hour.

* * *

Apparently, Doofenshmirtz decided to take 2 days of vacation.

Perry had no problem with that, since it meant spending more time with his nephews and watching all the wonderful things they could come up with (at least before something or other made them disappear just as Candance was about to bust them).

He really liked having time for himself, but he couldn't help thinking about the doctor and wondering how he was and if he managed to rest well. His screams were still in his mind, his memory of the day fresh as he recalled perfectly when the beam hit Heinz and all the times he screamed in pain or fear.

He was around the kitchen looking for a snack when his watch beeped. Perry made sure no one was around before going to one of his secret entrances.

He saluted Monogram before his boss started speaking.

"Agent P, sorry to interrupt your afternoon." There was some apprehension on his face as he said that. "We have no reports of Doofenshmirtz doing anything in the last 2 days, no activity on his lab whatsoever, and only some food deliveries to his apartment."

 _No activity?_ That sounded weird for the doctor, considering he was someone who liked to keep working.

"We're suspecting a possible plot to distract us so he can do evil," Monogram continued, before being interrupted by Carl.

"Maybe he's just taking a longer vacations sir."

"Nonsense Carl." The assistant's suggestion was dismissed. "The man is an evil scientist waiting to rule the Tri-state Area. I'm sure Agent P agrees that he must check on Dr. Doofenshmirtz to thwart any evil pans he's preparing!"

"But sir, I really doubt he has a plan going if there has been no movement on his lab for two days." Carl kept trying to reason.

Monogram gave a sigh before turning to the spy. "Whether or not that's the case, this behavior is not like the doctor. So, I will leave the decision of whether or not to check on him to you Agent P."

Perry gave a salute to indicate he understood, watching his boss log off. He sat on his chair for a moment mulling the situation.

 _It's not like Dr. D to not work on some new project for long periods of time..._ Perry thought confused. _Maybe...he's still not doing okay?_

He decided to go check on him but not as a job, but rather as a concerned friend.

After sending a text to Candance about having to go to work and that she was in charge, he got his bike out of the garage to go to the DEI, worry for the doctor's well being heavy on his mind.

* * *

Perry stood at his nemesis' door waiting for it to be opened after having knocked. After a few more seconds went by he decided to use his own key to let himself in.

 _It's not like him to not answer the door,_ the agent thought, his worry increasing.

When he got into the apartment he stood in surprise at the state of disarray of the whole place. He found the kitchen with takeaway boxes and dirty plates, cloths scattered around the floor and on top of furniture, the television on but muted with no one watching it at the couch. But must importantly, no Heinz around.

Perry decided to check his room and see if he was just taking a nap or something, but instead found him on the floor at the side of his bed, unmoving.

Dread crept unto Perry like a snake coiling around its prey to suffocate it, he stood at the threshold of the room just staring at the other.

Then Doofenshmirtz made a sound akin to a groan and spurred the agent into action.

With quick strides Perry was at the doctor's side in an instant helping him get off the floor, holding his shoulders when the other swayed a little.

Finally, Doofenshmirtz seemed to notice where he was and who was with him.

"Perry...the platypus?" he slurred out in confusion. Hazy eyes blinking sluggishly at the other.

The spy took notice of his state. The dark bags under the eyes were the most prominent thing, and the pale color of his skin didn't help the look that much. His hair was in complete disarray, more so than usual, and his cloths (a sleeveless shirt and some pants) were dirty and crumbled, as if he had worn them for a while now.

Perry let go of his shoulders to start singing to the other. " _What happened? Are you okay_?"

The doctor took a while before his tired mind finally understood what the other asked, "Just...a few hours...without sleep..." he answered in the same manner as before.

 _Hours?!_ Perry thought in disbelief. The look of the man suggested more than just a few hours. " _How many 'hours'_?" he asked in clear suspicion.

"Around 50...something?" Doofenshmirtz answered with some confusion, trying to calculate the actual number.

The agent stared at him in complete horror, no wonder the guy was so out of it.

Just as he was about to reprimand him the doctor swayed again and started falling to the side. Perry managed to catch him around the middle in some sort of embrace before he could get hurt.

He could tell Heinz legs had no strength to keep him up anymore, so the agent sat him on the bed. He then held unto the other's shoulders again before kneeling on the floor in front of him to look him in the eyes.

"Sorry..." the doctor apologized. "Black dots...on my vision..."

Perry frowned, not liking that admission at all. At least that explained why Heinz was on the floor when he arrived.

" _You need to sleep. You're about to drop dead_." he tried to reason with the other, only to get a look of panic in return.

"No!" Doofenshmirtz shouted, surprising the other with it. "I can't! The nightmares will return!"

 _Ah, that explains everything..._ He should've known that was the reason. He should've known Heinz wasn't okay after what happened to him. He should've known he lied about being fine.

Perry felt sad that his friend kept the truth from him, but he couldn't blame him. The poor man was used to being alone and taking care of himself, he just didn't know anything else.

He kept mulling things over before feeling the other tilt to the side again. He caught the doctor again before making him lay on the bed completely. Doofenshmirtz tried to complain but his awareness was slipping more and more.

After taking care of that, the agent went to the other side of the bed, taking his phone out to send a text to Linda telling her he would be staying with a friend. He took his shoes off before laying on the bed and turned to face the other.

"...Perry?" Heinz looked at him with confusion, before the other dragged him to hold him with care.

_He needs to sleep whether he likes it or not. But I‘m not gonna let him stay alone._

"I'll hold you through your nightmares." His raspy voice surprised the doctor, making sure he was looking at him while he said the rest, "You're not alone. I'm here with you."

Doofenshmirtz stared for a few seconds before giving a smile of appreciation, moving a little so he could snuggle the other more comfortably before finally giving into the exhaustion of his body and falling asleep almost immediately.

Perry looked at his sleepy face, deciding to give the other a small kiss on the crown of his head.

"Sleep well Heinz."

**Author's Note:**

> My idea of a human Perry is that his code name is platypus, he can't talk because of an accident with his throat years ago, he is Lawrence's cousin and lives with his family in the same house as a supposed tech support guy, who gets calls at anytime of the day.  
> Anyways, hope you liked it. Please leave a review or if you just wish to say hi that's valid too.


End file.
